// JavaScript Document
function show(n)
{
  for(i=1;i<=document.getElementById('suj').getElementsByTagName('ul').length;i++)	
  {
	 document.getElementById('st'+i).className="";
	 document.getElementById('s'+i).style.display="none";  
  }
     document.getElementById('st'+n).className="current";
	 document.getElementById('s'+n).style.display="block";  
}









var timer
var j=-655;
var r=-1;
function scrstart(vs)
{
  timer=setTimeout('scrstart(vs)',30);
  if(j>=-1)
   {
	   clearTimeout(timer);
	   document.getElementById('pop'+vs).style.left='0px';
   }
   else
   { 
     j=j/2;
	 document.getElementById('pop'+vs).style.left=j+'px';
   }
}
function scrstart_close(s)
{
  timer=setTimeout('scrstart_close(vs)',30);
  if(r<=-655)
   {
	   clearTimeout(timer);
	   document.getElementById('pop'+vs).style.left='-655px';
   }
   else
   { 
     r=r*2;
	 document.getElementById('pop'+vs).style.left=r+'px';
   }
}
function scrpop(n,s,id)
{
  if(n=="open")
  { 	j=-655;
   	 r=-1;
	vs=s;
    	timer=setTimeout('scrstart(vs)',10);
	
	
	 $.post("/ajax/ajaxNewsInfo.ashx", { id: id }, function(data) {

        var html = '';
        html = data;


        $('#news_Cont').html(html);
    });

  }
  if(n=="close")
  { j=-655;
    r=-1;
	timer=setTimeout('scrstart_close(vs)',10);
  }
}
//开关效果
var timerr;
var timerrr;
var il=200;
var ir=700;

timerr=setInterval('scrl()',50)
function scrl()
{
   if(il<=1)
   {
	 clearTimeout(timerr);
	 document.getElementById('popl').style.left='0px';
	 document.getElementById('popr').style.left='0px';
   }
   else
   {
	 il=il/2;
	 ir=ir/2;
	 document.getElementById('popl').style.left=il+'px';
	 document.getElementById('popr').style.left=-ir+'px';
   }
}

function scrlr(n)
{  
   lj=n;
   timerrr=setTimeout('scrr()',10);   
}
function scrr()
{  
   timerrr=setTimeout('scrr()',10);
   if(il>=700)
   {
	 clearTimeout(timerrr);
	 document.getElementById('popl').style.left='155px';
	 document.getElementById('popr').style.left='-654px';
	 location.href=lj;
   }
   else
   { 
	 il=il*2;
	 ir=ir*2;
	 document.getElementById('popl').style.left=il+'px';
	 document.getElementById('popr').style.left=-ir+'px';
   }
}











